package cn.cvs.service.impl;

import cn.cvs.dao.SysDeptMapper;
import cn.cvs.pojo.SysDept;
import cn.cvs.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysDeptServiceImpl implements SysDeptService {

    @Autowired
    private SysDeptMapper sysDeptMapper;

    @Override
    public List<SysDept> list() {
        return sysDeptMapper.list();
    }

    @Override
    public List<SysDept> children(Integer parentId) {
        return sysDeptMapper.children(parentId);
    }

    @Override
    public SysDept topDept(Integer i) {
        return sysDeptMapper.topDept(i);
    }

    @Override
    public List<SysDept> deptAll(Integer page,Integer limit) {
        return sysDeptMapper.deptAll(page,limit);
    }

    @Override
    public int count() {
        return sysDeptMapper.count();
    }
}
